package se.rende.myrss.data;

import java.util.List;

import com.sun.syndication.feed.synd.SyndEntry;

public class Filter {
	private String id;
	private String name;
	private FilterType type;
	private List<String> params;
	
	public Filter(String id, String name, FilterType type, List<String> params) {
		this.id = id;
		this.name = name;
		this.setParams(params);
		this.setType(type);
	}
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public FilterType getType() {
		return type;
	}
	public void setType(FilterType type) {
		this.type = type;
	}

	public List<String> getParams() {
		return params;
	}

	public void setParams(List<String> params) {
		this.params = params;
	}

	public String execute(String s, SyndEntry syndEntry) {
		return type.execute(s, params, syndEntry);
	}
}
